<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>CSS盒模型</title>
        <style media="screen">
            html * {
                margin: 0;
                padding: 0;
            }
            body {
                background-color: antiquewhite;
            }
            .fgx {
                width: 100%;
                height: 10px;
                clear: both;
                background-color: tomato;
            }
            .fa {
                background-color: aquamarine;
                width: 300px;
                /* height: 300px; */

                /* overflow: hidden; */
            }
            .son {
                background-color: thistle;
                width: 100px;
                height: 100px;
                opacity: 0.5;

                /* 撑不开父级元素 */
                /* float: left; */

                /* 子盒子 marign 产生margin 塌陷 */
                margin: 50px;
            }
        </style>
    </head>
    <body>
        <div class="fgx"></div>

        <div class="fa">
            <div class="son"></div>
        </div>
        <p>子盒子marign 产生margin 塌陷</p>

        <div class="fgx"></div>

        <div class="fa" style="overflow: hidden">
            <div class="son"></div>
        </div>
        <p>设置父盒子 overflow: hidden</p>
    </body>
</html>
